﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Castle.DynamicProxy;
using System.Reflection;

namespace Project.Util
{
    /// <summary>
    /// Aop
    /// </summary>
    public class AopUtility
    {
        public static T AddInterceptor<T>(T t1, IInterceptor interceptor)
            where T : class
        {
            ProxyGenerator Generator = new ProxyGenerator();
            return Generator.CreateClassProxyWithTarget<T>(t1, interceptor);
        }
    }
}
